app.get('/:id.html', (req, res) => {
  //获取路径参数
  // console.log(req.params.id); // params 参数
  let {id} = req.params;
  //获取商品的标题
  let good = goods[id];
  if(good){
    res.send(`<!DOCTYPE html>
    <html lang="en">
    <head>
      <meta charset="UTF-8">
      <meta http-equiv="X-UA-Compatible" content="IE=edge">
      <meta name="viewport" content="width=device-width, initial-scale=1.0">
      <title>Document</title>
    </head>
    <body>
        <h2>${good.title}</h2>
        <p>${good.price}</p>
    </body>
    </html>`);
  }else{
    res.send('暂无此商品~~');
  }
});